/*
 * @Author: NtyAaron
 * @Date: 2021-04-10 20:23:13
 * @LastEditors: NtyAaron
 * @LastEditTime: 2021-06-23 14:22:25
 * @Description: 航班查询api
 * @FilePath: \dwq\api\checkFlight\checkFlight.js
 */

import request from '../../utils/request'

// 根据城市查询航班信息
export const getInfoByCity = (e) => {
  return request({
    url: `/aviation/getInfoByCity?city=${e.city}&date=${e.date}&endcity=${e.endcity}`,
  })
}

// 根据航班号查询航班信息
export const getInfoByNumber = (e) => {
  return request({
    url: `/aviation/getInfoByNumber?date=${e.date}&flightno=${e.flightno}`,
  })
}

// 获取全球城市
export const getCityLabel = (e) => {
  return request({
    url: `/aviation/getCityLabel`,
  })
}

// 根据航班号查询航班信息(境外)
export const getPlaneInfo = (data) => {
  return request({
    url: `/aviation/getPlaneInfo`,
    data,
  })
}

// 根据目的地查询航班信息(境外)
export const getPlaneList = (data) => {
  return request({
    url: `/aviation/getPlaneList`,
    data,
  })
}
